<div class="nav">
    <a class="sel" href="{:U('index')}">资讯列表</a>
    <a href="{:U('add')}">添加资讯</a>
</div>
<div class="search">
    <form method="get" action="">
        资讯标题：<input type="text" name="title" class="input1" id="title" value="{$title}" />&nbsp;
        资讯类别：<select name="help_id" id="help_id" class="sel1">
            <option value="">所有类别</option>
            <foreach name="news_cat" item="item">
                <option value="{$item.help_id}" >{$item.help_name}</option>
            </foreach>
        </select>
        &nbsp;发布日期：<input type="text" class="input1" name="time_begin" id="time_begin" style="width:70px" value="{$time_begin}" onclick="WdatePicker()" /> 到 <input type="text" name="time_end" class="input1" id="time_end" style="width:70px" value="{$time_end}" onclick="WdatePicker()" />
        &nbsp;<input type="submit" value="搜索" class="btn_search" />
        <script type="text/javascript">
            $("#help_id").val('{$help_id}');
        </script>

    </form>
</div>
<div class="list">
    <form method="post" action="">
        <table class="table_list">
            <thead><tr>
                    <td width="60px">选择</td>
                    <td>资讯标题</td>
                    <td width="100px">所属类别</td>
                    <td width="80px">发布时间</td>
                    <td width="80px">顺序编号</td>
                    <td width="60px">是否显示</td>
                    <td width="180px">操作</td>
                </tr>
            </thead>
            <tbody>
            <foreach name="list" item="list">
                <tr>
                    <td><input type="checkbox" name="sel[]" value="{$list.news_id}" /></td>  
                    <td style="text-align:left;">{$list.title}</td>
                    <td>{$list.cate_name}</td>
                    <td>{$list.create_time|date='Y-m-d',###}</td>
                    <td class="edit_input" attr_t="order_id" attr_id="{$list.news_id}">{$list.order_id}</td>
                    <td class="edit_toggle" attr_t="is_show" attr_id="{$list.news_id}">{$list.is_show}</td>
                    <td><a class="btn_a" href="{:U('edit',Array('news_id'=>$list['news_id']))}">修改</a>&nbsp;
                        <a class="btn_a2" href="{:U('del',Array('news_id'=>$list['news_id']))}" onclick="return confirm('确定删除吗？')">删除</a></td>
                </tr>
            </foreach>
            </tbody>
            <tfoot>
                <tr><td colspan="8" style="text-align:left;padding-left:8px">
                        <input name="chkAll" type="checkbox" id="chkAll" onclick="CheckAll(this.form)" value="checkbox"><label for="chkAll">全选</label>&nbsp;
                        <input type="submit" class="btn_a2" value="删除所选" onclick="return confirm('确定删除所选吗？')"　　 />
                        <input type="hidden" name="action" id="action" value="delsel" />
                    </td>
                <tr><td colspan="8"><div class="page">{$page}</div></td>
                </tr>
            </tfoot>
        </table>
    </form>
</div>
<script type="text/javascript">
    function CheckAll(form)
    {
        for (var i = 0; i < form.elements.length; i++)
        {
            var e = form.elements[i];
            if (e.Name != "chkAll")
                e.checked = form.chkAll.checked;
        }
    }
</script>